using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
using System.Resources;
using System.Runtime.Serialization;
using System.Text;
using System.Threading.Tasks;

namespace KPIS.GERP.Models.ICM
{
    [DataContract, Table("IcmRequestParcelDtl")]
    public class RequestParcelDtl
    {
		[Key, DatabaseGenerated(DatabaseGeneratedOption.Identity)]
		[DataMember, Display(Name = "ReqDtlId", ResourceType = typeof(Resources.RequestParcelDtlResource))]
        public int ReqDtlId { get; set; }

        [ForeignKey("RequestParcel")]
		[DataMember, Display(Name = "ReqParcelId", ResourceType = typeof(Resources.RequestParcelDtlResource))]
        public Nullable<int> ReqId { get; set; }

        [ForeignKey("MasResourceItem")]
		[DataMember, Display(Name = "ResItemId", ResourceType = typeof(Resources.RequestParcelDtlResource))]
        public Nullable<int> ResItemId { get; set; }

		//[DataMember, Display(Name = "SeqNo", ResourceType = typeof(Resources.RequestParcelDtlResource))]
        //public Nullable<int> SeqNo { get; set; }

        [ForeignKey("PrePurchaseRequest")]
		[DataMember, Display(Name = "PprId", ResourceType = typeof(Resources.RequestParcelDtlResource))]
        public Nullable<int> PprId { get; set; }

		[DataMember, Display(Name = "CreatedBy", ResourceType = typeof(Resources.RequestParcelDtlResource))]
        public Nullable<int> CreatedBy { get; set; }

		[DataMember, Display(Name = "CreatedWhen", ResourceType = typeof(Resources.RequestParcelDtlResource))]
        public Nullable<System.DateTime> CreatedWhen { get; set; }

		[DataMember, Display(Name = "UpdatedBy", ResourceType = typeof(Resources.RequestParcelDtlResource))]
        public Nullable<int> UpdatedBy { get; set; }

		[DataMember, Display(Name = "UpdatedWhen", ResourceType = typeof(Resources.RequestParcelDtlResource))]
        public Nullable<System.DateTime> UpdatedWhen { get; set; }

		[DataMember, Display(Name = "Quantity", ResourceType = typeof(Resources.RequestParcelDtlResource))]
        public Nullable<decimal> Quantity { get; set; }

		[DataMember, Display(Name = "ItemName", ResourceType = typeof(Resources.RequestParcelDtlResource))]
        public string ItemName { get; set; }

        [DataMember, Display(Name = "RequestType", ResourceType = typeof(Resources.RequestParcelDtlResource))]
        public string RequestType { get; set; }

        [DataMember, Display(Name = "RequestTypeCode", ResourceType = typeof(Resources.RequestParcelDtlResource))]
        public string RequestTypeCode { get; set; }

        [ForeignKey("JobSite")]
        [DataMember, Display(Name = "JobsiteId", ResourceType = typeof(Resources.RequestParcelDtlResource))]
        public int JobsiteId { get; set; }

        [StringLength(2)]
        [DataMember, Display(Name = "RecordStatus", ResourceType = typeof(Resources.RequestParcelDtlResource))]
        public string RecordStatus { get; set; }

        [StringLength(10)]
        [DataMember, Display(Name = "DispenseStatus", ResourceType = typeof(Resources.RequestParcelDtlResource))]
        public string DispenseStatus { get; set; }

        [DataMember]
        public virtual RequestParcel RequestParcel { get; set; }

        [DataMember]
        public virtual MasResourceItem MasResourceItem { get; set; }

        [DataMember]
        public virtual PrePurchaseRequest PrePurchaseRequest { get; set; }

       
        [DataMember]
        public virtual HRM.JobSite JobSite { get; set; }
    }
}